<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:include="common/head"></head>
<body class="childrenBody">
<blockquote class="layui-elem-quote news_search">
    <form class="layui-form form" action="/adminUser/list?requestJson=json" method="get">
        <div class="layui-inline">
            <a class="layui-btn modal-iframe"  data-params='{"content": "/adminUser/add", "title": "添加用户","full":false,"area":"700px,650px"}'>新增</a>
        </div>
        <div class="layui-inline">
            <a class="layui-btn layui-btn-danger batchDel ajax-all"  data-name="id" data-params='{"url": "/user/delete","data":"","confirm":"true","complete":"reloadTab"}'>批量删除</a>
        </div>
        <div class="layui-inline">
            <div class="layui-input-inline">
                <input type="text" name="keyword" value=""  jq-verify="required" placeholder="用户名" class="layui-input search_input">
            </div>
            <button lay-submit class="layui-btn" lay-filter="search">查找</button>
        </div>
    </form>
</blockquote>
<div class="layui-form links_list">
    <table class="layui-table">
        <colgroup>
            <col width="50">
            <col width="100">
            <col>
            <col>
            <col>
            <col>
            <col width="13%">
        </colgroup>
        <thead>
        <tr>
            <th><input type="checkbox" id="checkall" data-name="id" lay-filter="check" lay-skin="primary"></th>
            <th>序号</th>
            <th>id</th>
            <th>账号</th>
            <th>昵称</th>
            <th>用户类型</th>
            <th>上次登录时间</th>
            <th>创建时间</th>
            <th>更新时间</th>
            <th>状态</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody id="list"></tbody>
    </table>
</div>
<div id="page"></div>

<script id="list-tpl" type="text/html" data-params='{"url":"/adminUser/list?requestJson=json","pageid":"#page"}'>
    {{#  layui.each(d, function(index, it){ }}
    <tr>
        <td><input type="checkbox" name="id" value="{{ it.id}}" lay-skin="primary" ></td>
        <td align="left">{{index+1}}</td>
        <td align="left">{{it.id}}</td>
        <td align="left">{{it.username}}</td>
        <td align="left">{{it.nickname}}</td>
        <td align="left">{{it.userType}}</td>
        <td align="left">{{it.lastLoginTime}}</td>
        <td align="left">{{it.createTime}}</td>
        <td align="left">{{it.updateTime}}</td>
        <td align="left"><input type="checkbox" name="userState" lay-skin="switch" lay-text="启用|禁止" {{#if (parseInt(it.status)==1){ }}checked="checked" value="true" {{# } }} lay-filter="ajax"
                                data-params='{"url":"/user/userState","data":"id={{it.id}}"}'></td>
        <td align="left">
            <a class="layui-btn layui-btn-mini modal-iframe" data-params='{"content": "/user/edit?id={{it.id}}", "title": "编辑用户","full":false,"area":"700px,650px"}'><i class="iconfont icon-edit"></i> 编辑</a>
            <a class="layui-btn layui-btn-danger layui-btn-mini ajax" data-params='{"url": "/user/delete","confirm":true,"data":"id={{it.id}}","complete":"reloadTab"}'><i class="layui-icon">&#xe640;</i> 删除</a>
        </td>
    </tr>
    {{#  }); }}

    {{#  if(d.length == 0){ }}
    <tr><td colspan='7' align='left' style='color:#999999;'>未查到任何数据</td></tr>
    {{#  } }}
</script>
<div th:include="common/version"></div>
    <script type="text/javascript">
        layui.use('list');
    </script>
</body>
</html>